#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
int main()
{
	FILE* fp1 = fopen("data.txt", "r");
	if (fp1 == NULL)
	{
		perror("fopen");
		return 1;
	}
	FILE* fp2 = fopen("data_copy.txt", "w");
	if (fp2 == NULL)
	{
		perror("fopen");
		return 2;
	}
	char arr[20];
	while (fgets(arr, 20, fp1) != 0)
	{
		fputs(arr, fp2);
	}
	fclose(fp1);
	fp1 = NULL;
	fclose(fp2);
	fp2 = NULL;
	return 0;
}